package com.util;

import javax.imageio.ImageIO;
import java.awt.image.BufferedImage;
import java.io.*;

public class ImageUtil {

    public static boolean isImage(File imageFile) {
        if(!imageFile.exists()) {
            return false;
        }
        BufferedImage src = null;

        try {
            src = ImageIO.read(imageFile);
        } catch (Exception e) {
            e.printStackTrace();
        }
        return src != null;
    }
}
